import json
import os
import sys

import pytest
import yaml

import api.login
from common.yaml_util import read_yaml, write_yaml, clear_yaml
from script.test02_login import *
import config

if __name__ == '__main__':
    pytest.main()
    # print(sys.path)
    # clear_yaml()
    # print(os.path.dirname(__file__))
    # with open(os.getcwd() + '/script/test_data.yaml', 'r', encoding='utf') as f:
    #     yaml_data = yaml.load(f, Loader=yaml.FullLoader)
    # test_data = []
    # for data in yaml_data:
    #     test_data.append((data.get('username'),
    #                       data.get('password'),
    #                       data.get('code'),
    #                       data.get('response_status'),
    #                       data.get('response_msg'),
    #                       data.get('response_code'),
    #                       ))
    # # print(test_data)
    # from script.test02_login import yaml_data
    # test_data = yaml_data()
    # print(test_data)
    # for data in test_data:
    #     print(data)
    #     print(type(data))